#!/usr/bin/env python
# -*- coding: utf-8 -*-

import logging
import logging.config
import logging.handlers
#from logging import RotatingFileHandler

class logger:
    log_instance = None
    def __init__(self):
        logging.config.fileConfig('logging.cfg')
    def logger(self, name = ''):
        return logging.getLogger(name)
    
    @staticmethod
    def getInstance(name):
        if logger.log_instance == None:
            logger.log_instance = logger()
        return logger.log_instance.logger(name)

if __name__ == "__main__":
    lgr = logger.getInstance('simple')
    lgr.info('aaaa')

    rlgr = logger.getInstance('running')
    rlgr.info('qqqqqqqq')
    pass
